
using awdb;

namespace done;

static class Program
{
    static void Main(string[] args)
    {
        object ip = "211.112.21.0";
        //object ip = "2001:023a:0000:0000:0000:0000:0000:0000";
        string flie = @"test.awdb";
        Console.WriteLine(ip);

        var awdber = new Awdb(flie);

        var data = awdber.ReadAwdb(ip);
        if (data != null)
        {
            foreach (var Key in data.Keys)
            {
                if (data[Key] is not  List<Dictionary<string, string>>)
                {
                    Console.WriteLine("key :{0}, value : {1}",Key,data[Key]);
                }
                else
                {
                    foreach (var datakey in data[Key])
                    {
                        foreach (var datas in datakey)
                        {
                            Console.WriteLine("multiAreas key :{0}, value : {1}",datas.Key,datas.Value);
                        }
                    }
                }
            }
            
        }
        else
        {
            Console.WriteLine($"{ip} 没有查到................");
        }
    }
}